<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
      
         <div class="box">
            <button>关闭</button>
            <div id="box">
                <img src="/20200808102720912.png">
            </div>
         </div>
       
         <script>
             $(function()
             {
                 $("button").bind("click",function()
                 {
                    $("img").animate({
                        height:0
                    },500,function(){
                        $('#box').animate({
	          width: 0
         }, 1000);

                    })
                 })
             })
         </script>
</body>
</html>